<?php
	if(isset($user_login) and isset($pwd_login)) {
?>
<html>
<head>
<title>Check User</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
</head>

<body bgcolor="#FFFFCC">

<?php 
$result = mysql_query("select user,password from member where user='$user_login' and password='$pwd_login'") ;
$num = mysql_num_rows($result) ;
if($num<=0) {
echo "<br><br><center><font size='3' face='MS Sans Serif'><b>รหัสผ่านไม่ถูกต้องครับ</b></font></center>" ;
print "<meta http-equiv=refresh content=2;URL=index.php>";
exit() ;
}
else {

$dbarr = mysql_fetch_array($result) ;
if($user_login!=$dbarr['user'] and $pwd_login!=$dbarr['password']) {
echo "รหัสผ่านไม่ถูกต้อง" ;
exit() ;
}

else {
$login_true = $user_login ;
session_register("login_true") ;
echo "<meta http-equiv='refresh' content='0 ;url=".site_url()."/template_u/register/member_detail.php'>" ;
exit() ;
}
}
}
?>


</body>
</html>
